home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / PASCSRC.ZIP / BIGCASE.PAS < prev    next >
Pascal/Delphi Source File  |  1988-01-15  |  837b  |  25 lines

  1.                                 (* Chapter 4 - Program 9 *)
  2. program A_Bigger_Case_Example;
  3.  
  4. var Count : integer;
  5.     Index : byte;
  6.  
  7. begin  (* main program *)
  8.    for Count := 1 to 10 do begin
  9.       Write(Count:5);
  10.          case Count of
  11.            7..9  : Write(' Big Number');
  12.            2,4,6 : begin Write(' Small');
  13.                          Write(' even');
  14.                          Write(' number.');
  15.                    end;
  16.            3 : for Index := 1 to 3 do Write(' Boo');
  17.            1 : if TRUE then begin Write(' TRUE is True,');
  18.                                   Write(' and this is dumb.');
  19.                             end;
  20.          else Write(' This number is not in the allowable list');
  21.          end; (* of case structure *)
  22.       Writeln;
  23.    end;  (* of Count loop *)
  24. end.  (* of main program *)
  25.